
<?php include './application/views/top.php'; ?>
<script src="/static/js/gsdai.js"></script>
<script src="/static/js/ajaxfileupload.js"></script>
<script src="/static/js/My97DatePicker/WdatePicker.js"></script>
<script src="/static/js/formCheck.js"></script>

<div class="clear"></div>
<div class="user_bottom all"></div>
<div class="clear h50"></div>
<div class="layout uc">
	<?php include './application/views/user/left.php'; ?>
	<?php
		$sex = $v['sex'];
		$cardType = $v['cardType'];
	?>
	<div class="right">
		<div class="menu_list"><?php include './application/views/user/menu.php'; ?></div>
		<?php if($type == 3){?>
        <div class="seach">
		<form id="collForm" action="/userborrow/coll.html" method="get">
			开始时间：<input class="input" type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo $where['strtime'];?>"  onfocus="WdatePicker()" readonly/>
			结束时间：<input class="input" type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo $where['endtime'];?>"  onfocus="WdatePicker()" readonly/>
			<a href="javascript:void(0)" onclick="document.getElementById('collForm').submit();" class="ann">查询</a>
			<a href="/userborrow/coll.html?act=excel&strtime=<?php echo $where['strtime'];?>&endtime=<?php echo $where['endtime'];?>"  class="ann">导出</a>
		</form>
        </div>
        <?php }?>
        <div class="cont">
        	<ul class="tbt">
            	<li class="w168">债权转让标题</li>
                <li class="w100">折后金额</li>
                <li class="w100">购买金额</li>
                <li class="w100">待收金额</li>
                <li class="w100">已还金额</li>
                <li class="w100">状态</li>
                <li class="w150">购买时间</li>
                <li class="w100 npr">操作</li>
			</ul>
			<?php 
				$stsArr = array(1=>'申购中',2=>'已通过',3=>'已还完',4=>'已取消');
			?>
            <?php foreach ($list as $val){?>
        	<ul class="tbc">
            	<li class="w168">
					<?php if (in_array($val['fstatus'], array(1,2,3))){?>
					<a href="/borrow/creditor/<?php echo $val['obj_id'];?>.html"><?php echo $val['title'];?></a>
					<?php }else{?>
					<?php echo $val['title'];?>
					<?php }?>
                </li>
            	<li class="w100"><?php echo $val['discount_account'];?></li>
                <li class="w100"><?php echo $val['discount_buy'];?></li>
                <li class="w100"><?php echo $val['repay_account'];?></li>
                <li class="w100"><?php echo $val['repay_yesaccount'];?></li>
                <li class="w100"><?php echo $stsArr[$val['fstatus']];?></li>
                <li class="w150"><?php echo date('Y-m-d H:i:s',$val['add_time']);?></li>
            	<li class="w100 npr">
					<?php if($val['fstatus'] == 2){?>
					<a target="_blank" href="/userborrow/creditorprotocol/<?php echo $val['id'];?>.html">转让协议书</a>
					&nbsp;&nbsp;
					<a target="_blank" href="/borrow/lzprotocol/<?php echo $val['borrow_id'];?>/<?php echo $val['tender_id'];?>.html">原借款协议书</a>
					<?php }?>	
                </li>

			</ul>
        	<?php }?>
        </div>
        <div class="clear h30"></div>
        <div class="page">
            <div class="pagination">
            <?php echo $this->pagination->create_links();?>
            </div>
        </div>
	</div>
</div>
<div class="clear h50"></div>
<?php include "./application/views/footer.php";?>